<template>
	<div id="asaa">
			<div  class="search-container" >
				<el-form :model="tiaojian">
					<div class="search-input" style="float: left;margin-left: 20px;">
						任务编号:<el-input v-model="tiaojian.taskid" placeholder="角色名称" style="width: 200px;"></el-input>
					</div>
					<div class="search-input" style="float: left;">
						线路编号:<el-input v-model="tiaojian.linecode" placeholder="角色名称" style="width: 200px;"></el-input>
					</div>
					<div class="search-input" style="float: left;">
						杆塔编号：<el-input v-model="tiaojian.poleid" placeholder="角色名称" style="width: 200px;"></el-input>
					</div>
					<div class="search-input" style="float: left;">
						发现人:<el-input v-model="tiaojian.discoverername" placeholder="角色名称" style="width: 200px;"></el-input>
					</div>
					<div class="search-button" style="float: left;">
						<el-button @click.prevent="show()" type="primary">查询</el-button>
					</div>
					<br /><br /><br />
					<div class="search-input" style="float: left;margin-left: 20px;">
						缺陷类型 ：
						<el-select placeholder="--请选择--" v-model="bugType">
							<el-option v-for="bug in bugType" :label="bug.configvaluename" :value="bug.configvaluename" :key="bug.id"></el-option>
						</el-select>
					</div>
					
					<div class="block">
						<span class="demonstration">发现时间：</span>
						<el-date-picker v-model="operateDatetime" type="daterange" range-separator="至"
							start-placeholder="开始日期" end-placeholder="结束日期">
						</el-date-picker>
					</div>
				</el-form>
			</div>
		<template>
			<el-table :data="duix" border style="width: 100%;margin-top: 50px;">
				<el-table-column prop="taskid" label="任务编号">
				</el-table-column>
				<el-table-column prop="linecode" label="线路编号">
				</el-table-column>
				<el-table-column prop="poleid" label="杆塔编号">
				</el-table-column>
				<el-table-column prop="" label="缺陷类型">
				</el-table-column>
				<el-table-column prop="intactrate" label="完好率"> 
				</el-table-column>
				<el-table-column prop="bugdesc" label="缺陷描述">
				</el-table-column>
				<el-table-column prop="discovertime" label="发现时间">
				</el-table-column>
				<el-table-column prop="discoverername" label="发现人员">
				</el-table-column>
				<el-table-column prop="" label="缺陷级别">
				</el-table-column>


			</el-table>
			<el-pagination :page-size="50" :pager-count="10" style="margin-top: 20px;float: right;" background
				layout="prev, pager, next" :total="500" @current-change="handleCurrentChange" >
			</el-pagination>
		</template>
	</div>
</template>

<script>
	export default {
		data() {
			return {
				tiaojian:{
					taskid:'',
					linecode:'',
					poleid:'',
					discoverername:''
				},
				bugType:[],
				duix:[{}]
			}
		},
		methods: {
			show(){
							this.axios.get("http://localhost:8080/psinspectiontaskdetail/show",{
								params:{
									tid:this.tiaojian.taskid
								}
							}).then((res)=>{
								console.log(res);
								this.duix=res.data;
							}).catch(err=>{
								console.log(err);
							});
						},
			
			getSel(){
				this.axios.get("http://localhost:8080/systemconfig/getSel",{
					params:{
						
					}
				}).then((res)=>{
					this.bugType=res.data;
					console.log(res);
				}).catch(err=>{
					console.log(err);
				})
			}
		},
		mounted() {
			this.show();
			this.getSel()
		}
	}
</script>
	
<style>
</style>